<div id="usermodal" class="modal" tabindex="-1" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" ng-click="$hide()">&times;</button>
                <h4 class="modal-title">修改密码</h4>
            </div>
            <div class="modal-body" >
                <form class="form-horizontal" role="form" id="userfrom" name="userfrom" autocomplete="off"
                      ng-submit="submitUser(userfrom.$valid)" novalidate>
                    <table class="table-form table-bordered">
                        <tr>
                            <th>用户名称：</th>
                            <td>
                                {{userinfovm.name}}
                            </td>
                            <th>登录帐号：</th>
                            <td>
                                {{uservm.username}}
                            </td>
                        </tr>
                        <tr>
                            <th><span style="color:red;">*</span>密码：</th>
                            <td colspan="3"
                                ng-class="{ 'has-error' : userfrom.pwd_default.$invalid &&  userfrom.$submitted}">
                                <input type="password" name="pwd_default" ng-model="pwd.pwd_default" maxlength="100"
                                       class="form-control" ng-required="true"/>
                            </td>

                        </tr>
                        <tr>
                            <th><span style="color:red;">*</span>确认密码：</th>
                            <td colspan="3"
                                ng-class="{ 'has-error' : userfrom.pwd_confirm.$invalid &&  userfrom.$submitted}">
                                <input type="password" name="pwd_confirm" ng-model="pwd.pwd_confirm" maxlength="100"
                                       class="form-control" ng-required="true"/>
                                <span ng-show="!pwd.pwd_default.$error.required && !pwd.pwd_confirm.$error.required && pwd.pwd_default != pwd.pwd_confirm && userfrom.$submitted"
                                      class="help-block">两次密码输入不一致</span>
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" ng-click="$hide()">取消</button>
                <button type="submit" class="btn btn-primary" form="userfrom">保存</button>
            </div>
        </div>
    </div>
</div>